(0) Obligation:
The Runtime Complexity (innermost) of the given
CpxTRS could be proven to be
BOUNDS(1, n^3).
The TRS R consists of the following rules:
le(0, Y) → true
le(s(X), 0) → false
le(s(X), s(Y)) → le(X, Y)
minus(0, Y) → 0
minus(s(X), Y) → ifMinus(le(s(X), Y), s(X), Y)
ifMinus(true, s(X), Y) → 0
ifMinus(false, s(X), Y) → s(minus(X, Y))
quot(0, s(Y)) → 0
quot(s(X), s(Y)) → s(quot(minus(X, Y), s(Y)))
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted Cpx (relative) TRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(0, z0) → 0
minus(s(z0), z1) → ifMinus(le(s(z0), z1), s(z0), z1)
ifMinus(true, s(z0), z1) → 0
ifMinus(false, s(z0), z1) → s(minus(z0, z1))
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
Tuples:
LE(0, z0) → c
LE(s(z0), 0) → c1
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(0, z0) → c3
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IFMINUS(true, s(z0), z1) → c5
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
QUOT(0, s(z0)) → c7
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
S tuples:
LE(0, z0) → c
LE(s(z0), 0) → c1
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(0, z0) → c3
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IFMINUS(true, s(z0), z1) → c5
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
QUOT(0, s(z0)) → c7
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
K tuples:none
Defined Rule Symbols:
le, minus, ifMinus, quot
Defined Pair Symbols:
LE, MINUS, IFMINUS, QUOT
Compound Symbols:
c, c1, c2, c3, c4, c5, c6, c7, c8
(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 5 trailing nodes:
MINUS(0, z0) → c3
QUOT(0, s(z0)) → c7
LE(s(z0), 0) → c1
LE(0, z0) → c
IFMINUS(true, s(z0), z1) → c5
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(0, z0) → 0
minus(s(z0), z1) → ifMinus(le(s(z0), z1), s(z0), z1)
ifMinus(true, s(z0), z1) → 0
ifMinus(false, s(z0), z1) → s(minus(z0, z1))
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
Tuples:
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
S tuples:
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
K tuples:none
Defined Rule Symbols:
le, minus, ifMinus, quot
Defined Pair Symbols:
LE, MINUS, IFMINUS, QUOT
Compound Symbols:
c2, c4, c6, c8
(5) CdtUsableRulesProof (EQUIVALENT transformation)
The following rules are not usable and were removed:
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(0, z0) → 0
minus(s(z0), z1) → ifMinus(le(s(z0), z1), s(z0), z1)
ifMinus(true, s(z0), z1) → 0
ifMinus(false, s(z0), z1) → s(minus(z0, z1))
Tuples:
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
S tuples:
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
K tuples:none
Defined Rule Symbols:
le, minus, ifMinus
Defined Pair Symbols:
LE, MINUS, IFMINUS, QUOT
Compound Symbols:
c2, c4, c6, c8
(7) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
We considered the (Usable) Rules:
ifMinus(true, s(z0), z1) → 0
ifMinus(false, s(z0), z1) → s(minus(z0, z1))
minus(s(z0), z1) → ifMinus(le(s(z0), z1), s(z0), z1)
minus(0, z0) → 0
And the Tuples:
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = 0
POL(IFMINUS(x1, x2, x3)) = 0
POL(LE(x1, x2)) = 0
POL(MINUS(x1, x2)) = 0
POL(QUOT(x1, x2)) = x1
POL(c2(x1)) = x1
POL(c4(x1, x2)) = x1 + x2
POL(c6(x1)) = x1
POL(c8(x1, x2)) = x1 + x2
POL(false) = 0
POL(ifMinus(x1, x2, x3)) = x2
POL(le(x1, x2)) = 0
POL(minus(x1, x2)) = x1
POL(s(x1)) = [1] + x1
POL(true) = 0
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(0, z0) → 0
minus(s(z0), z1) → ifMinus(le(s(z0), z1), s(z0), z1)
ifMinus(true, s(z0), z1) → 0
ifMinus(false, s(z0), z1) → s(minus(z0, z1))
Tuples:
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
S tuples:
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
K tuples:
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
Defined Rule Symbols:
le, minus, ifMinus
Defined Pair Symbols:
LE, MINUS, IFMINUS, QUOT
Compound Symbols:
c2, c4, c6, c8
(9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
We considered the (Usable) Rules:
ifMinus(true, s(z0), z1) → 0
ifMinus(false, s(z0), z1) → s(minus(z0, z1))
minus(s(z0), z1) → ifMinus(le(s(z0), z1), s(z0), z1)
minus(0, z0) → 0
And the Tuples:
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = 0
POL(IFMINUS(x1, x2, x3)) = x2
POL(LE(x1, x2)) = 0
POL(MINUS(x1, x2)) = x1
POL(QUOT(x1, x2)) = x12
POL(c2(x1)) = x1
POL(c4(x1, x2)) = x1 + x2
POL(c6(x1)) = x1
POL(c8(x1, x2)) = x1 + x2
POL(false) = 0
POL(ifMinus(x1, x2, x3)) = x2
POL(le(x1, x2)) = 0
POL(minus(x1, x2)) = x1
POL(s(x1)) = [1] + x1
POL(true) = 0
(10) Obligation:
Complexity Dependency Tuples Problem
Rules:
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(0, z0) → 0
minus(s(z0), z1) → ifMinus(le(s(z0), z1), s(z0), z1)
ifMinus(true, s(z0), z1) → 0
ifMinus(false, s(z0), z1) → s(minus(z0, z1))
Tuples:
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
S tuples:
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
K tuples:
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
Defined Rule Symbols:
le, minus, ifMinus
Defined Pair Symbols:
LE, MINUS, IFMINUS, QUOT
Compound Symbols:
c2, c4, c6, c8
(11) CdtKnowledgeProof (BOTH BOUNDS(ID, ID) transformation)
The following tuples could be moved from S to K by knowledge propagation:
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
(12) Obligation:
Complexity Dependency Tuples Problem
Rules:
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(0, z0) → 0
minus(s(z0), z1) → ifMinus(le(s(z0), z1), s(z0), z1)
ifMinus(true, s(z0), z1) → 0
ifMinus(false, s(z0), z1) → s(minus(z0, z1))
Tuples:
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
S tuples:
LE(s(z0), s(z1)) → c2(LE(z0, z1))
K tuples:
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
Defined Rule Symbols:
le, minus, ifMinus
Defined Pair Symbols:
LE, MINUS, IFMINUS, QUOT
Compound Symbols:
c2, c4, c6, c8
(13) CdtRuleRemovalProof (UPPER BOUND(ADD(n^3)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
LE(s(z0), s(z1)) → c2(LE(z0, z1))
We considered the (Usable) Rules:
ifMinus(true, s(z0), z1) → 0
ifMinus(false, s(z0), z1) → s(minus(z0, z1))
minus(s(z0), z1) → ifMinus(le(s(z0), z1), s(z0), z1)
minus(0, z0) → 0
And the Tuples:
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = 0
POL(IFMINUS(x1, x2, x3)) = [1] + x22
POL(LE(x1, x2)) = x1
POL(MINUS(x1, x2)) = [1] + x1 + x12
POL(QUOT(x1, x2)) = x13
POL(c2(x1)) = x1
POL(c4(x1, x2)) = x1 + x2
POL(c6(x1)) = x1
POL(c8(x1, x2)) = x1 + x2
POL(false) = 0
POL(ifMinus(x1, x2, x3)) = x2
POL(le(x1, x2)) = 0
POL(minus(x1, x2)) = x1
POL(s(x1)) = [1] + x1
POL(true) = 0
(14) Obligation:
Complexity Dependency Tuples Problem
Rules:
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
le(0, z0) → true
minus(0, z0) → 0
minus(s(z0), z1) → ifMinus(le(s(z0), z1), s(z0), z1)
ifMinus(true, s(z0), z1) → 0
ifMinus(false, s(z0), z1) → s(minus(z0, z1))
Tuples:
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
S tuples:none
K tuples:
QUOT(s(z0), s(z1)) → c8(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
IFMINUS(false, s(z0), z1) → c6(MINUS(z0, z1))
MINUS(s(z0), z1) → c4(IFMINUS(le(s(z0), z1), s(z0), z1), LE(s(z0), z1))
LE(s(z0), s(z1)) → c2(LE(z0, z1))
Defined Rule Symbols:
le, minus, ifMinus
Defined Pair Symbols:
LE, MINUS, IFMINUS, QUOT
Compound Symbols:
c2, c4, c6, c8
(15) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)
The set S is empty
(16) BOUNDS(1, 1)